package com.ruoyi.platform.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.platform.mapper.TInvoiceDetailMapper;
import com.ruoyi.platform.domain.TInvoiceDetail;
import com.ruoyi.platform.service.ITInvoiceDetailService;

/**
 * 发票详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-20
 */
@Service
public class TInvoiceDetailServiceImpl implements ITInvoiceDetailService 
{
    @Autowired
    private TInvoiceDetailMapper tInvoiceDetailMapper;

    /**
     * 查询发票详情
     * 
     * @param detailId 发票详情主键
     * @return 发票详情
     */
    @Override
    public TInvoiceDetail selectTInvoiceDetailByDetailId(Long detailId)
    {
        return tInvoiceDetailMapper.selectTInvoiceDetailByDetailId(detailId);
    }

    /**
     * 查询发票详情列表
     * 
     * @param tInvoiceDetail 发票详情
     * @return 发票详情
     */
    @Override
    public List<TInvoiceDetail> selectTInvoiceDetailList(TInvoiceDetail tInvoiceDetail)
    {
        return tInvoiceDetailMapper.selectTInvoiceDetailList(tInvoiceDetail);
    }

    /**
     * 新增发票详情
     * 
     * @param tInvoiceDetail 发票详情
     * @return 结果
     */
    @Override
    public int insertTInvoiceDetail(TInvoiceDetail tInvoiceDetail)
    {
        return tInvoiceDetailMapper.insertTInvoiceDetail(tInvoiceDetail);
    }

    /**
     * 修改发票详情
     * 
     * @param tInvoiceDetail 发票详情
     * @return 结果
     */
    @Override
    public int updateTInvoiceDetail(TInvoiceDetail tInvoiceDetail)
    {
        return tInvoiceDetailMapper.updateTInvoiceDetail(tInvoiceDetail);
    }

    /**
     * 批量删除发票详情
     * 
     * @param detailIds 需要删除的发票详情主键
     * @return 结果
     */
    @Override
    public int deleteTInvoiceDetailByDetailIds(Long[] detailIds)
    {
        return tInvoiceDetailMapper.deleteTInvoiceDetailByDetailIds(detailIds);
    }

    /**
     * 删除发票详情信息
     * 
     * @param detailId 发票详情主键
     * @return 结果
     */
    @Override
    public int deleteTInvoiceDetailByDetailId(Long detailId)
    {
        return tInvoiceDetailMapper.deleteTInvoiceDetailByDetailId(detailId);
    }
}
